<%
################################################################################
# NOTE: It is STRONGLY suggested that if you wish to customize the look and feel
# of your Helpy, that you create a custom theme instead.  This will allow
# you to override any views or styles you wish to, without compromising your
# ability to upgrade in the future
################################################################################
%>

<!-- screenshots thumbnail partial -->
<%= content_tag(:div, id: 'post-images')  do %>
    <%= content_tag(:ul, class: 'list-inline') do %>
        <%- model_name.screenshots.each do |screenshot| %>
          <%= content_tag(:li, class: screenshot.resource_type) do %>
            <% if Cloudinary.config.cloud_name.present? && screenshot.resource_type == "raw" %>
                <%= link_to "https://res.cloudinary.com/#{Cloudinary.config.cloud_name}/raw/upload/#{screenshot.path}", title: screenshot.path, target: 'blank' do %>
                  <%= content_tag(:i, '', class: attachment_icon(screenshot.path)) %>
                <% end %>
            <% elsif Cloudinary.config.cloud_name.present? %>
              <%= link_to cl_image_tag(get_path(screenshot), { size: '125x125', crop: :fit }), "https://res.cloudinary.com/#{Cloudinary.config.cloud_name}/image/upload/#{screenshot.path}", class: 'screenshot-link', target: 'blank' %>
            <% end %>
          <% end %>
        <% end %>
    <% end %>
<% end %>
